package com.ylfstu;

/**
 * @author:Joy_Yang
 * @date:2022/9/26
 * @version:1.0
 */
public class Homework05 {
    public static void main(String[] args) {
        A a = new A();
        a.f1();
    }
}

class A{
    private String n1 = "100";
    public void f1() {
        class B{
            private final String name = "joy";
            void show() {
                System.out.println("name = " + name);
                System.out.println("n1 = " + A.this.n1);
            }
        }
        B b = new B();
        b.show();
    }
}










